<?php echo $html->docType('html4-trans'); ?> 
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" xml:lang="es" lang="es-CL">
<head profile="http://gmpg.org/xfn/11">
	<?php echo $html->charset(); ?> 
	<title><?php echo sprintf('%s%s', $title_for_layout . ' &middot; ', Configure::read('Site.name')); ?></title>
	<meta name="language" content="es"/>
	<meta name="author" content="Restart Lab"/>
	<?php echo $html->meta('icon', Configure::read('Site.Url.static') . '/favicon.ico', array('type' => 'icon')); ?> 
	<script type="text/javascript" charset="utf8">
		var WWW_BASE = '<?php echo $this->webroot; ?>';
		
		var language_for_tinymce = 'es';
		
		var localized_str_markdown = 'markdown';
		var localized_str_html_enabled = '<?php __('HTML habilitado'); ?>';
		var localized_str_bold = '<?php __('Negrita'); ?>';
		var localized_str_italic = '<?php __('Cursiva'); ?>';
		var localized_str_strikethrough = '<?php __('Tachado'); ?>';
		var localized_str_enter_the_url = '<?php __('Ingresar URL: '); ?>';
		var localized_str_insert_link = '<?php __('Insertar enlace'); ?>';
	</script>
	<?php echo $html->script($jscript); ?> 
	<?php echo $html->css($cssheet); ?> 
	<!--[if lt IE 9]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	<?php echo $scripts_for_layout; ?> 
</head>
<body>

<?php echo $session->flash(); ?>
<div id="loading-bar"><?php __('Cargando...'); ?></div>

<div id="topbar">
	<div class="wrapper">
		<div class="grid-25">
			<div class="shop">
				<?php echo $html->link(__('Configuración', true), array('controller' => 'shops', 'action' => 'dashboard_settings')); ?>
				<?php echo $html->link(__('Preferencias', true), array('controller' => 'shops', 'action' => 'dashboard_notifications')); ?>
				<?php echo $html->link(__('Personalizar diseño', true), array('controller' => 'cuztomize', 'action' => 'dashboard_index')); ?>
			</div>
			
			<div class="profile">
				<div class="">
					<?php echo $html->image('/media/' . ($session->check('User.Profile.profile') ? 'profile/' . $session->read('User.Profile.profile') : 'profile-preview.gif'), array('width' => 16, 'height' => 16, 'class' => 'photo', 'alt' => $session->read('User.Profile.name'))); ?>
					<?php echo $html->link($session->read('User.Profile.name'), array('controller' => 'users', 'action' => 'people', 'shortcut' => $session->read('User.shortcut'))); ?>
				</div>
				<?php echo $html->link(__('Mi perfil', true), array('controller' => 'users', 'action' => 'profile')); ?>
				<?php //__('Invitar personas'); ?>
				<?php echo $html->link(__('Ayuda', true), array('controller' => 'help', 'action' => 'index')); ?>
				<?php echo $html->link(__('Cerrar sesión', true), array('controller' => 'users', 'action' => 'logout')); ?>
			</div>
		</div>
	</div>
</div>

<div id="container" class="container">
	<div id="inner">

		<div id="head">
			<div class="menu">
				<div class="wrapper corner-top-right corner-top-left">
					<div class="grid-25">
						<h1><?php echo $html->link(String::insert(__(':shop :spanIr a la tienda:/span', true), array('shop' => Configure::read('Shop.name'), 'span' => '<span>', '/span' => '</span>')), '/', array('escape' => false)); ?></h1>
					</div>
					<div class="grid-25 menu">
						<ul>
							<li<?php echo (preg_match('/dashboard+/', $this->params['url']['url']) ? ' class="current"' : ''); ?>><?php echo $html->link(__('Inicio', true), array('controller' => 'dashboard', 'action' => 'index')); ?></li>
							<li<?php echo (preg_match('/orders+/', $this->params['url']['url']) ? ' class="current"' : ''); ?>><?php echo $html->link(__('Pedidos / Cotizaciones', true), array('controller' => 'orders', 'action' => 'dashboard_index')); ?></li>
							<li<?php echo (preg_match('/customers+/', $this->params['url']['url']) ? ' class="current"' : ''); ?>><?php echo $html->link(__('Clientes', true), array('controller' => 'customers', 'action' => 'dashboard_index')); ?></li>
							<li class="sub<?php echo (preg_match('/(categories|stock)+/', $this->params['url']['url']) ? ' current' : ''); ?>">
								<span><?php __('Mi Catálogo'); ?></span>
								<ul>
									<li><?php echo $html->link(__('Productos', true), array('controller' => 'products', 'action' => 'dashboard_index')); ?></li>
									<li><?php echo $html->link(__('Categorías', true), array('controller' => 'taxonomies', 'action' => 'dashboard_index')); ?></li>
									<li><?php echo $html->link(__('Exportar / Importar', true), array('controller' => 'products', 'action' => 'dashboard_export')); ?></li>
								</ul>
							</li>
							<li class="sub<?php echo (preg_match('/nodes+/', $this->params['url']['url']) ? ' current' : ''); ?>">
								<?php echo $html->link(__('Noticias / Blog', true), array('controller' => 'posts', 'action' => 'dashboard_index', 'type' => 'blog')); ?>
								<ul>
									<li><?php echo $html->link(__('Comentarios', true), array('controller' => 'posts', 'action' => 'dashboard_comments', 'type' => 'blog')); ?></li>
								</ul>
							</li>
							<li<?php echo (preg_match('/docs+/', $this->params['url']['url']) ? ' class="current"' : ''); ?>><?php echo $html->link(__('Páginas', true), array('controller' => 'posts', 'action' => 'dashboard_index', 'type' => 'pages')); ?></li>
							<li<?php echo (preg_match('/marketing+/', $this->params['url']['url']) ? ' class="current"' : ''); ?>><?php echo $html->link(__('Marketing', true), array('controller' => 'marketing', 'action' => 'dashboard_index')); ?></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		
<?php echo $content_for_layout . "\n"; ?>

		<div id="foot">
			<div class="wrapper">
			
<?php echo $this->element('dashboard/foot'); ?>
				
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
	(function($){
		$('div.menu ul ul').css({display: 'none'}); // Opera Fix
		$('div.menu ul li').hover(function(){
			$(this).find('ul:first').css({visibility: 'visible', display: 'none'}).show();
		},function(){
			$(this).find('ul:first').css({visibility: 'hidden'});
		});
	})(jQuery);
</script>

</body>
</html>
<?php echo $this->element('sql_dump'); ?>